package com.fer.andenginemvc.api.gameObjects;

import org.andengine.entity.primitive.Rectangle;
import org.andengine.extension.physics.box2d.PhysicsFactory;
import org.andengine.extension.physics.box2d.PhysicsWorld;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

import android.util.Log;

import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.BodyDef.BodyType;
import com.badlogic.gdx.physics.box2d.FixtureDef;

public class Powerup extends GameObject<Rectangle> {
		
	public Powerup(PhysicsWorld world, VertexBufferObjectManager vbom, float x, float y) {
		super(world, vbom, new Rectangle(x-15, y-15, 30,30, vbom));
		
	}

	@Override
	public Body initBody() {
		return PhysicsFactory.createBoxBody(physWorld, entity, BodyType.KinematicBody, fixtureDef);
	}

	@Override
	public FixtureDef initFixtureDef() {
		return PhysicsFactory.createFixtureDef(0, 0, 0);
	}

	
	@Override
	public void onCollision(GameObject<?> go) {
		Log.v("Collision", go.getClass() + " with "+this.getClass());
		die();
	}
	
}
